package com.ssis.core;

import org.newdawn.slick.util.Log;
import com.ssis.graphics.Sprite;

public class StationCursor {
	private int x;
	private int y;
	private Sprite sprite;
	
	public StationCursor() {
		x = 0;
		y = 0;
		sprite = new Sprite("station_cursor", x * Cell.CELL_WIDTH, y * Cell.CELL_WIDTH);
	}
	
	public void render(int xOffset, int yOffset) {
		sprite.moveto(x * Cell.CELL_WIDTH - xOffset, y * Cell.CELL_WIDTH - yOffset);
		sprite.render();
	}
	
	public void moveto(int x, int y) {
		if (this.x != x || this.y != y)
			Log.debug("Moved cursor to " + x + "," + y);
		this.x = x;
		this.y = y;
	}
	
	public int getX() {
		return x;
	}
	
	public int getY() {
		return y;
	}
}
